<?php

interface AutoUpdater extends Mapper
{
    /**
     * Define the writeright you want to use for the next query
     * @param SHARE/LOCK $mode
     * @return AutoUpdater $this
     */
    public function setWriteRight($mode = AutoUpdater::LOCK);

    /**
     * Forces the update with the database
     * Gets called at object destruction too.
     */
    public function update();
    
    public function getIDs();
    
    /**
     * @return AutoUpdater $this
     */
    public function selectAll();
    
    /**
     * @param array $ids
     * @return AutoUpdater $this
     */
    public function selectByIDs(array $ids);
}